home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr37 / vndnfo1a.zip / TESTDIST.BAT < prev    next >
DOS Batch File  |  1995-03-12  |  10KB  |  193 lines

  1. goto start
  2. :usage
  3. echo off
  4. cls
  5. echo ╔═════════════════════════════════════════════════════════════╗ 
  6. echo ║    testdist.bat -- perform distribution policy tests on     ║
  7. echo ║                    a VENDINFO file, writing LOGS to         ║
  8. echo ║                    specified file                           ║
  9. echo ║                                                             ║
  10. echo ║    usage:                                                   ║
  11. echo ║           testdist diz_file out_file                        ║
  12. echo ║    where:                                                   ║
  13. echo ║           diz_file = pathname of VENDINFO file              ║
  14. echo ║                                                             ║
  15. echo ║           out_file = pathname of output file to which       ║
  16. echo ║                      log files information should be        ║
  17. echo ║                      written                                ║
  18. echo ║                                                             ║
  19. echo ║    example:                                                 ║
  20. echo ║           testdist vendinfo.diz sample.prn                  ║
  21. echo ║                                                             ║
  22. echo ║ Copyright 1993-94 Rams' Island Software All Rights Reserved ║
  23. echo ║   Rams' Island Software, 7644 Lakecliff, Parker CO 80134    ║
  24. echo ╚═════════════════════════════════════════════════════════════╝
  25. goto exit
  26.  
  27. :start
  28. rem ----- desired VendPrcs test goes here ---------------------------
  29. if %1.==. goto usage
  30. if %2.==. goto usage
  31. del %2
  32.  
  33. rem ----- test for valid, authenticated file ------------------------
  34. vendprcs %1 -zk                      -y " "                      > %2
  35. if errorlevel 12 goto allOK
  36.  
  37. :test11
  38. if not errorlevel 11 goto test10
  39. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  40. echo │ Test of validity and authentication of VENDINFO.DIZ file │ >> %2
  41. echo └──────────────────────────────────────────────────────────┘ >> %2
  42. echo       This VENDINFO.DIZ file has a missing or invalid      >> %2
  43. echo       author authentication code.  If you are the author   >> %2
  44. echo       and you are testing your VENDINFO.DIZ file, this     >> %2
  45. echo       simply means that you have not yet registered        >> %2
  46. echo       VendEdit and entered the registration numbers so     >> %2
  47. echo       that VendEdit can produce an authenticated record.   >> %2
  48. echo       (It's also possible that you have a special-purpose  >> %2
  49. echo       VendEdit registration, and are attempting to produce >> %2
  50. echo       VENDINFO records for products outside the allowed    >> %2
  51. echo       types.  Try Verify Warnings for more information.)   >> %2
  52. vendprcs    -y " "      >> %2
  53. echo       If you are an author testing your VENDINFO.DIZ file  >> %2
  54. echo       and you have already entered your registration keys, >> %2
  55. echo       make sure that the company name used in this         >> %2
  56. echo       VENDINFO file exactly matches the name in which you  >> %2
  57. echo       registered.  Registration keys are tied to your      >> %2
  58. echo       company name.  In VendEdit, try Edit Author Company  >> %2
  59. echo       and press F3.                                        >> %2
  60. vendprcs    -y " "      >> %2
  61. echo       If you have found this VENDINFO.DIZ file in a        >> %2
  62. echo       distributed package, however, then that package may  >> %2
  63. echo       be hacked or corrupted.                              >> %2
  64. vendprcs    -y " "      >> %2
  65. echo       Authentication verification will be turned off for   >> %2
  66. echo       the remaining tests, so you can see the results as   >> %2
  67. echo       a distributor would see them after you've registered >> %2
  68. echo       and entered the registration keys for your company.  >> %2
  69. goto continue
  70.  
  71. :test10
  72. if errorlevel 10 goto badtext
  73. if errorlevel 1 goto error
  74. goto allOK
  75.  
  76. :error
  77. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  78. echo │ Test of validity and authentication of VENDINFO.DIZ file │ >> %2
  79. echo └──────────────────────────────────────────────────────────┘ >> %2
  80. echo       There has been an error in the reading of this       >> %2
  81. echo       VENDINFO.DIZ file, preventing further processing.    >> %2
  82. echo       The error is probably an incorrect size or CRC       >> %2
  83. echo       for either the text or the data section, and may be  >> %2
  84. echo       caused by a hacked or corrupted file.                >> %2
  85. goto exit
  86.  
  87. :badtext
  88. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  89. echo │ Test of validity and authentication of VENDINFO.DIZ file │ >> %2
  90. echo └──────────────────────────────────────────────────────────┘ >> %2
  91. echo       This VENDINFO.DIZ file has an incorrect size or CRC  >> %2
  92. echo       for either the text or the data section, and may be  >> %2
  93. echo       a hacked or corrupted file.                          >> %2
  94. goto exit
  95.  
  96. :allOK
  97. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  98. echo │ Test of validity and authentication of VENDINFO.DIZ file │ >> %2
  99. echo └──────────────────────────────────────────────────────────┘ >> %2
  100. echo       This VENDINFO.DIZ file has passed all validity and   >> %2
  101. echo       security tests, including size and CRC tests and     >> %2
  102. echo       basic author source authentication.                  >> %2
  103.  
  104. :continue
  105. del VENDDATA
  106.  
  107. vendprcs    -y " "      >> %2
  108. vendprcs    -y " "      >> %2
  109. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  110. echo │ Simple test for BBS distribution, no special conditions  │ >> %2
  111. echo └──────────────────────────────────────────────────────────┘ >> %2
  112. vendprcs %1 -db     -na >> %2
  113. vendprcs    -y " "      >> %2
  114. vendprcs    -y " "      >> %2
  115. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  116. echo │ BBS distribution, no charge to customers                 │ >> %2
  117. echo └──────────────────────────────────────────────────────────┘ >> %2
  118. vendprcs %1 -db -c0 -na >> %2
  119. vendprcs    -y " "      >> %2
  120. vendprcs    -y " "      >> %2
  121. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  122. echo │ BBS distribution, $50/yr., recompress, add ad,           │ >> %2
  123. echo │ mail disks to some users                                 │ >> %2
  124. echo └──────────────────────────────────────────────────────────┘ >> %2
  125. vendprcs %1 -db -cy5000 -omac -na >> %2
  126. vendprcs    -y " "      >> %2
  127. vendprcs    -y " "      >> %2
  128. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  129. echo │ FDN distribution                                         │ >> %2
  130. echo └──────────────────────────────────────────────────────────┘ >> %2
  131. vendprcs %1 -df     -na >> %2
  132. vendprcs    -y " "      >> %2
  133. vendprcs    -y " "      >> %2
  134. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  135. echo │ Mail-order disk vendor, no special conditions            │ >> %2
  136. echo └──────────────────────────────────────────────────────────┘ >> %2
  137. vendprcs %1 -dd     -na >> %2
  138. vendprcs    -y " "      >> %2
  139. vendprcs    -y " "      >> %2
  140. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  141. echo │ Mail-order disk vendor, $5/360K                          │ >> %2
  142. echo └──────────────────────────────────────────────────────────┘ >> %2
  143. vendprcs %1 -dd -ck500 -cp0 -cy0 -na >> %2
  144. vendprcs    -y " "      >> %2
  145. vendprcs    -y " "      >> %2
  146. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  147. echo │ Disk vendor, $5/360K, ASP/informs/non-prof user group    │ >> %2
  148. echo └──────────────────────────────────────────────────────────┘ >> %2
  149. vendprcs %1 -dd -ck500 -cp0 -cy0 -tan -oipods -na >> %2
  150. vendprcs    -y " "      >> %2
  151. vendprcs    -y " "      >> %2
  152. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  153. echo │ Disk vendor, $50/360K, ASP/informs/non-prof user group   │ >> %2
  154. echo └──────────────────────────────────────────────────────────┘ >> %2
  155. vendprcs %1 -dd -ck5000 -cp0 -cy0 -tan -oipods -na >> %2
  156. vendprcs    -y " "      >> %2
  157. vendprcs    -y " "      >> %2
  158. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  159. echo │ CD-ROM, targetted end users only, $50, ASP distributor   │ >> %2
  160. echo └──────────────────────────────────────────────────────────┘ >> %2
  161. vendprcs %1 -dc -mcbd -cc5000 -ta -oipods -na >> %2
  162. vendprcs    -y " "      >> %2
  163. vendprcs    -y " "      >> %2
  164. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  165. echo │ CD-ROM, targetted BBSes and distributors, $50, informs   │ >> %2
  166. echo └──────────────────────────────────────────────────────────┘ >> %2
  167. vendprcs %1 -dc -mcu -cc5000 -oipods -na >> %2
  168. vendprcs    -y " "      >> %2
  169. vendprcs    -y " "      >> %2
  170. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  171. echo │ Rack distributor, $9.99/program                          │ >> %2
  172. echo └──────────────────────────────────────────────────────────┘ >> %2
  173. vendprcs %1 -dr -ck0 -cp999 -na >> %2
  174. vendprcs    -y " "      >> %2
  175. vendprcs    -y " "      >> %2
  176. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  177. echo │ Installation on user's machine by consultant             │ >> %2
  178. echo └──────────────────────────────────────────────────────────┘ >> %2
  179. vendprcs %1 -di -tc -na >> %2
  180. vendprcs    -y " "      >> %2
  181. vendprcs    -y " "      >> %2
  182. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  183. echo │ Distribution by undefined method                         │ >> %2
  184. echo └──────────────────────────────────────────────────────────┘ >> %2
  185. vendprcs %1 -du     -na >> %2
  186. vendprcs    -y " "      >> %2
  187. vendprcs    -y " "      >> %2
  188. echo ┌──────────────────────────────────────────────────────────┐ >> %2
  189. echo │ Feel free to add your own tests to this TESTDIST.BAT     │ >> %2
  190. echo └──────────────────────────────────────────────────────────┘ >> %2
  191.  
  192. :exit
  193.